#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
top=$DIR/../..

export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:$LD_LIBRARY_PATH
if [ "$1" == "--debug" ]; then
    shift
    gdb --args $top/build/tools/dcpverify "$@"
elif [ "$1" == "--valgrind" ]; then
    shift
    valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpverify "$@"
else
    $top/build/tools/dcpverify "$@"
fi
